package com.happycat.mobile.enums;

import org.apache.commons.lang3.StringUtils;

public enum ShortMessageEnum {
	
	register("1","SMS_147900662"),
	login("2","SMS_147900664"),
	modifyPassword("3","SMS_147900661"),
	resetPassword("4","SMS_197940315");
	private String code;	
	private String name;
	
	ShortMessageEnum(String code , String name) {
		this.code = code;
		this.name = name;
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static String  getShortMessageEnumName(String code ) {
		for (ShortMessageEnum m : ShortMessageEnum.values()) {
            if (StringUtils.compare(code, m.code) == 0) {
                return m.getName();
            }
        }
		return "";
	}
}
